<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">

<html>
<head>

<script type="text/javascript">
var xmlDoc;
// code for IE
if (window.ActiveXObject)
{
xmlDoc=new ActiveXObject("Microsoft.XMLDOM");
}
// code for Mozilla, Firefox, Opera, etc.
else if (document.implementation.createDocument)
{
xmlDoc=document.implementation.createDocument("","",null);
}
else
{
alert('Your browser cannot handle this script');
}

xmlDoc.async=false;
xmlDoc.load("catalog.xml");
var x=xmlDoc.getElementsByTagName("PIC");
i=1;

function next()
{
if (i<x.length)
  {
  i++;
  display();
  }
}

function previous()
{

if (i>0)
  {
  i--;
  display();
  }
}

function display()
{
url=(x[i].getElementsByTagName("URL")[0].childNodes[0].nodeValue);

document.getElementById("show").innerHTML="<img src=" + url + ">";
}

</script>

</head>

<!-- 
<body onload="display()">
 --> 

<body>

<script type="text/javascript">
	window.onload=display;
</script>

 <br />
<input type="button" onclick="previous()" value="previous" />
<input type="button" onclick="next()" value="next" />
<hr>

<div id='show'>
</div>


</body>
</html>

